def enter(n, m):
    b = []
    for i in range(n):
        a = list(map(int, input().split()))
        b.append(a)
    return b


def mul(A, B):
    N, M = len(A), len(A[0])
    _M, K = len(B), len(B[0])
    if M != _M:
        return None
    C = [[0] * K for _ in range(N)]
    for i in range(N):
        for j in range(M):
            for k in range(K):
                C[i][k] += A[i][j] * B[j][k]
    return C


def output(c):
    for x in c:
        print(' '.join(map(str, x)))


N, M, K = map(int, input().split())
m1 = enter(N, M)
m2 = enter(M, K)

c = mul(m1, m2)
output(c)
